namespace Digitalmes.Infrastructure.IO;

/// <summary>
/// Excel 导出列选项。
/// </summary>
public sealed class ExcelColumnOptions
{
    /// <summary>
    /// 字段名称。
    /// </summary>
    [NotNull]
    public string? Key { get; set; }

    /// <summary>
    /// 要导出的 Excel 列名称。
    /// </summary>
    public string? ColumnName { get; set; }

    /// <summary>
    /// 是否忽略
    /// </summary>
    public bool? Ignore { get; set; }

    /// <summary>
    /// 列索引位置，从 1 开始
    /// </summary>
    public int? Index { get; set; }

    public string? Format { get; set; }

    /// <summary>
    /// 自定义格式器。
    /// </summary>
    public Func<object, string>? CustomFormatter { get; set; }

    /// <summary>
    /// 列宽
    /// </summary>
    public double? Width { get; set; }
}
